# ds <- readr::read_csv(here::here("/Volumes/Data/REDCap/DDV/talos_ddv.csv"))Article A: Final renders
# ds |> finalfit::missing_plot()On hanlding missings: https://finalfit.org/articles/missing.html
source(here::here("1 PA Decline/dst import.R"))
ls_tbl <- docx2ds(
path = "/Users/au301842/Library/CloudStorage/OneDrive-Personal/Research/PhD/1 Change in PA/Manuscript/Manuscript_Change in PA_v2_0.docx"
)Content types in the current document are as follows:
[1] "paragraph" "table cell"
Warning: The `value` argument of `names<-()` must have the same length as `x` as of
tibble 3.0.0.
Warning: The `value` argument of `names<-()` can't be empty as of tibble 3.0.0.
ls <- ls_tbl |> purrr::pluck(2) |>
(\(.x){
.x[-c(1:3,nrow(.x)),]
})()
n <- 0
for (i in seq_len(nrow(ls))){
if (ls[[2]][i]!=""){
n[i]<-n[length(n)]+1
} else {
n[i] <- n[length(n)]
}
}
split(ls,n) |> lapply(function(.x){
if (" TRUE" %in% .x[[1]]){
cbind(.x[1,1:2],.x[3,3:5],.x[1,6],.x[3,7:9])
} else {
.x
}
}) |> dplyr::bind_rows() |>
gt::gt()New names:
• `` -> `...1`
• `` -> `...2`
• `` -> `...3`
• `` -> `...4`
• `` -> `...5`
• `` -> `...6`
• `` -> `...7`
• `` -> `...8`
• `` -> `...9`
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
New names:
• `` -> `...1`
• `` -> `...2`
• `` -> `...3`
• `` -> `...4`
• `` -> `...5`
• `` -> `...6`
• `` -> `...7`
• `` -> `...8`
• `` -> `...9`
| ...1 | ...2 | ...3 | ...4 | ...5 | ...6 | ...7 | ...8 | ...9 |
|---|---|---|---|---|---|---|---|---|
| Age | 523 | -2.4 | -3.0, -1.9 | <0.001 | 423 | -0.90 | -1.7, -0.12 | 0.025 |
| Female sex | 523 | -38 | -53, -22 | <0.001 | 423 | -3.5 | -19, 12 | 0.7 |
| Body mass index | 358 | 1.8 | 0.14, 3.5 | 0.034 | - | - | - | - |
| Current smoker | 507 | -18 | -34, -1.9 | 0.029 | 423 | -5.8 | -21, 9.5 | 0.5 |
| Living with somebody | 517 | 46 | 30, 61 | <0.001 | 423 | 10 | -5.6, 26 | 0.2 |
| Alchohol consumption | 510 | 5.6 | -21, 32 | 0.7 | 423 | 4.8 | -19, 28 | 0.7 |
| Hypertension | 519 | -32 | -47, -17 | <0.001 | 423 | -3.0 | -17, 11 | 0.7 |
| Diabetes | 517 | -19 | -43, 5.0 | 0.12 | 423 | -16 | -38, 6.4 | 0.2 |
| Atrial fibrilation | 518 | 1.3 | -19, 22 | >0.9 | 423 | 21 | 2.0, 40 | 0.030 |
| Periferal arterial disease | 511 | -38 | -76, 0.70 | 0.054 | 423 | -9.0 | -45, 27 | 0.6 |
| Previous TIA | 517 | -2.8 | -51, 46 | >0.9 | 423 | 9.7 | -32, 51 | 0.6 |
| Previous MI | 517 | 2.8 | -25, 31 | 0.8 | 423 | 3.8 | -23, 31 | 0.8 |
| Treated with IVT | 509 | 14 | -2.3, 29 | 0.094 | 423 | 5.9 | -9.2, 21 | 0.4 |
| Treated with EVT | 510 | -9.5 | -39, 20 | 0.5 | 423 | -3.6 | -35, 28 | 0.8 |
| Study group allocation | 523 | 423 | ||||||
| Aktiv (Citalopram) | 0.00 | Reference | 0.00 | Reference | ||||
| Placebo | 7.2 | -8.0, 22 | 0.4 | 2.7 | -11, 16 | 0.7 | ||
| Pre-stroke PASE score | 523 | 0.51 | 0.44, 0.59 | <0.001 | 423 | 0.33 | 0.23, 0.43 | <0.001 |
| Acute NIHSS | 513 | -3.7 | -5.4, -2.0 | <0.001 | 423 | -2.3 | -4.2, -0.35 | 0.021 |
| Employed | 523 | 70 | 56, 84 | <0.001 | 423 | 13 | -5.4, 31 | 0.2 |
| Family income group | 523 | 423 | ||||||
| low | 0.00 | Reference | 0.00 | Reference | ||||
| medium | 39 | 22, 57 | <0.001 | 15 | -2.7, 32 | 0.10 | ||
| high | 79 | 62, 97 | <0.001 | 30 | 9.8, 50 | 0.004 | ||
| Educational level group | 474 | 423 | ||||||
| low | 0.00 | Reference | 0.00 | Reference | ||||
| medium | 28 | 11, 46 | 0.001 | 1.6 | -14, 17 | 0.8 | ||
| high | 46 | 24, 67 | <0.001 | 6.9 | -14, 27 | 0.5 | ||
| Pre-stroke WHO-5 score | 521 | 0.87 | 0.49, 1.3 | <0.001 | 423 | 0.62 | 0.27, 0.97 | <0.001 |
| Pre-stroke mRS > 0 | 523 | -58 | -77, -38 | <0.001 | 423 | -16 | -34, 2.5 | 0.091 |